package com.chartboost.sdk.impl;

import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;

public abstract class bh<T>
{
  final int a;
  private Queue<T> b = new ConcurrentLinkedQueue();

  public bh(int paramInt)
  {
    this.a = paramInt;
  }

  protected boolean a(T paramT)
  {
    return true;
  }

  protected abstract T b();

  public void b(T paramT)
  {
    if (!a(paramT));
    while (this.b.size() > this.a)
      return;
    this.b.add(paramT);
  }

  public T c()
  {
    Object localObject = this.b.poll();
    if (localObject != null)
      return localObject;
    return b();
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.chartboost.sdk.impl.bh
 * JD-Core Version:    0.6.2
 */